<template>
	<view>
		<view class="u-page">
			<image class="bgimg" :src="banner" mode=""></image>

			<view class="title" :style="titleStyle"> 我的 </view>

			<view class="header" :style="headerStyle">
				用户名
			</view>

			<view class="content">

			</view>
		</view>
		<!-- 与包裹页面所有内容的元素u-page同级，且在它的下方 -->
		<u-tabbar :list="list" :mid-button="true"></u-tabbar>
	</view>
</template>

<script>
	import {
		tabBarList
	} from '@/emun/tabBar'

	import {
		getWXStatusHeight
	} from '@/utils/common'
	export default {
		data() {
			return {
				list: tabBarList,
				banner: require('@/static/home/banner.jpg'),
				titleStyle: '',
				headerStyle: ''
			}
		},
		onLoad() {
			this.initTitleStyle()
		},
		methods: {
			initTitleStyle() {
				const {
					barHeight,
					barTop
				} = getWXStatusHeight()

				this.titleStyle = `top:${barTop}px;height:${barHeight}px`
				this.headerStyle = `top:${barTop + barHeight}px;`
				console.log(this.titleStyle)
			}
		},
	}
</script>

<style lang="scss" scoped>
	.nav-bar-title {
		font-weight: bold;
	}



	.u-page {
		.bgimg {
			width: 100%;
		}

		.title {
			position: absolute;
			font-weight: bold;
			color: #fff;
			margin-left: 15px;
			display: flex;
			align-items: center;
		}

		.header {
			position: absolute;
			padding: 15px;


		}

		.content {
			position: absolute;
			top: 200px;
			background: #FFF;
			width: 100vw;
			min-height: 100px;
			border-radius: 35px;
		}
	}
</style>